Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming
Comparing objects
You can compare two object references for equality using the equals operator (
=), which checks if two object references are actually referencing the same object. The object references can be equal even if the object references have been defined for different classes in the class hierarchy. Two object references are also equal if they are both the Unknown value (?).The following example demonstrates the use of the equal operator usin the two object references,
rSuperandrSubClass:
The
MESSAGEstatement will indeed be executed, demonstrating thatrSuperandrSubClassare equal even though they are defined as different classes in the class hierarchy.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |